********************************************************************************************************************************
***   Replication file for:                                                                                                  ***
***   Berbee, P., Braun, S. T. and Franke, R. (2024). Reversing Fortunes of German Regions, 1926-2019. JoEG.			     ***
***   							                                                                                             ***
***   SCRIPT: 	_x2h_preparation_census_2011.do																				 ***	
***   PURPOSE: 	Reads in data from the 2011 occupation census															 	 ***
********************************************************************************************************************************


* Preamble (unnecessary when executing run.do)
run "$reversing/scripts/programs/_config.do"

************
* Code begins
************

*** Import data
import excel "$reversing/data/census_2011.xlsx", firstrow clear


*** Save data 
drop A T_ID
rename Sheet1__La labor_market_id
destring labor_market_id, replace
sort labor_market_id

save "$reversing/processed/intermediate/census_2011.dta", replace

*** EOF